package com.door.erp.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * 销售单
 * @author yangxuelin
 */
@Entity
@Table(name = "sellorder", catalog = "door")
public class SellOrder implements Serializable {

	private static final long serialVersionUID = -7615509219381766101L;

	private long id;
	
	private Orders order;
	
	private double totalPrice;
	
	private double alreadyPay;
	
	private double debt;

	private String remark;
	
	private Date createTime;

	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	@OneToOne
	@JoinColumn(name="orderId", nullable=false)
	public Orders getOrder() {
		return order;
	}

	public void setOrder(Orders order) {
		this.order = order;
	}

	@Column(name="totalPrice", nullable=false)
	public double getTotalPrice() {
		return totalPrice;
	}

	public void setTotalPrice(double totalPrice) {
		this.totalPrice = totalPrice;
	}

	@Column(name="alreadyPay")
	public double getAlreadyPay() {
		return alreadyPay;
	}

	public void setAlreadyPay(double alreadyPay) {
		this.alreadyPay = alreadyPay;
	}

	@Column(name="debt")
	public double getDebt() {
		return debt;
	}

	public void setDebt(double debt) {
		this.debt = debt;
	}

	@Column(name="createTime", updatable=false)
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name="remark")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

}
